package com.huyanqi.front.rest.resource.impl;

import java.util.List;

import javax.annotation.Resource;

import com.huyanqi.core.RetdObj;
import com.huyanqi.entity.Sign;
import com.huyanqi.front.rest.RespCode;
import com.huyanqi.front.rest.resource.SignListResource;
import com.huyanqi.front.rest.resp.ShareListResp;
import com.huyanqi.front.rest.resp.SignListResp;
import com.huyanqi.front.rest.service.SignRestService;

public class SignResourceImpl implements SignListResource{

	private SignRestService restService;
	
	@Resource(name="SignRestService")
	public void setRestService(SignRestService restService) {
		this.restService = restService;
	}
	public SignRestService getRestService() {
		return restService;
	}
	
	@Override
	public SignListResp findMySign(Long uid) {
		SignListResp slp = new SignListResp();
		try{
			RetdObj<List<Sign>> retd = restService.findMySign(uid);
			slp.setData(retd.getRealObj());
			slp.setCode(RespCode.valueOf(retd.getCode()));
		}catch (Exception e) {
			e.printStackTrace();
			slp.setCode(RespCode.EX_APP);
		}
		return slp;
	}
	
}
